home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume3 / donice < prev    next >
Encoding:
Text File  |  1989-02-03  |  1.3 KB  |  55 lines

  1. Path: xanth!mcnc!gatech!mandrill!hal!ncoast!allbery
  2. From: loic@uunet.uu.net@axis.UUCP
  3. Newsgroups: comp.sources.misc
  4. Subject: v03i073: donice system call for Nuxi VAX-11
  5. Message-ID: <8807042059.AA29828@inria.inria.fr>
  6. Date: 4 Jul 88 20:59:59 GMT
  7. Sender: allbery@ncoast.UUCP
  8. Reply-To: loic@uunet.uu.net@axis.UUCP
  9. Lines: 43
  10. Approved: allbery@ncoast.UUCP
  11.  
  12. Posting-number: Volume 3, Issue 73
  13. Submitted-by: "A. Nonymous" <loic@uunet.uu.net@axis.UUCP>
  14. Archive-name: donice
  15.  
  16.   The renice command dynamically change the nice value of a process.
  17. It uses a hiden system call (donice). Here is a library function
  18. to use it.
  19.   It will work on NUXI-V.2 distribution 1.2 for VAX-11.
  20.  
  21. ------------------------------------------------------------------------
  22. #! /bin/sh
  23. # This is a shell archive, meaning:
  24. # 1. Remove everything above the #! /bin/sh line.
  25. # 2. Save the resulting text in a file.
  26. # 3. Execute the file with /bin/sh (not csh) to create the files:
  27. #    donice.s
  28. # This archive created: Sun Jul  3 21:22:45 1988
  29. #
  30. export PATH; PATH=/bin:$PATH
  31. if test -f 'donice.s'
  32. then
  33.     echo shar: will not over-write existing file "'donice.s'"
  34. else
  35. cat << \SHAR_EOF > 'donice.s'
  36.     .file    "donice.c"
  37.     .data
  38.     .text
  39.     .align    4
  40.     .globl    _donice
  41. _donice:
  42.     halt
  43.     halt
  44.     chmk    $0x38
  45.     bgequ    .L13
  46.     jmp    _donice
  47. .L13:
  48.     ret
  49.     .data
  50. SHAR_EOF
  51. chmod 644 'donice.s'
  52. fi # end of overwriting check
  53. #    End of shell archive
  54. exit 0
  55.